<script type="text/javascript">
    function gotoPage() {
        location.href = "${rc.contextPath}/cont/${bbsCommand.bbsNo}/list/${bbsCommand.nowPage}";
    }
    
	$(document).ready(function() {
		$('.nyroModal').nyroModal();
	});
</script>

<table border="1" cellpadding="1" cellspacing="0" width="990" align="center">
    <tr>
        <th>번호</th>
        <th>제목</th>
        <th>작성자</th>
        <th>날짜</th>
    </tr>
    <#if bbsList?has_content>
    <#list bbsList as item>
    <tr>
        <td align="center">${item.ContentIdx}</td>
        <td><a href="/bbs/cont/1/view/${bbsCommand.nowPage}/${item.ContentIdx}">${item.Title}</a></td>
        <td align="center">${item.UserID}</td>
        <td align="center">
            <#if .now?string('yyyyMMdd') == item.RegDate>
                ${item.RegTime?date('HHmm')?string('HH:mm')}
            <#else>
                ${item.RegDate?date('yyyyMMdd')}
            </#if>
        </td>
    </tr>
    </#list>
    <#else>
        <tr>
            <td colspan="4" align="center">검색된 결과가 없습니다.</td>
        </tr>
    </#if>
</table>

<div align="center">
    <div style="width: 30%; float: left;">
        <#if bbsCommand.contentNo &gt; 0>
            <a href="#" onclick="gotoPage(); return false;">목록</a>
        </#if>
    </div>
    <div align="right" style="width: 70%;">
        <a href="${rc.contextPath}/cont/${bbsCommand.bbsNo}/insert/${bbsCommand.nowPage}" class="nyroModal" rev="modal">글쓰기</a>
    </div>
</div>

<#include "/common/layout/search.ftl">
<#include "/common/layout/paging.ftl">
